An operating system may include a system clock to provide a system time for measuring small increments of time (e.g. 1 millisecond increments). The system clock may update the system clock in response to a periodic interrupt generated by a system timer such as an Intel 8254 event timer, an Intel High Performance Event Timer (HPET), or a real time clock event timer. The operating system may use the system time to time-stamp files, to generate periodic interrupts, to generate time-based one-shot interrupts, to schedule processes, etc. Generally, the system clock may keep a system time while a computing device is operating, but typically is unable to keep a system time once the computing device is powered off or placed in a sleep state. The operating system therefore may use a reference clock to initialize the system time of the system clock at system start-up and at system wake-up. Further, the system clock tends to drift away from the correct time. Accordingly, the operating system may use a reference clock to periodically update the system time of the system clock.
One such reference clock is a hardware real time clock (RTC). A computing device typically includes an RTC and a battery to power the RTC when the computing device is powered down. Due to the battery power, the RTC is able to maintain a real time or a wall time even when the computing device is powered off or placed in a sleep state, and generally is capable of keeping time more accurately than the system clock. Besides providing an interface for obtaining the wall time, the RTC further provides an interface such as, for example, one or more registers which may be used to set or change the time of the RTC. As is known by those skilled in the art, wall time refers to actual real time (e.g. 12:01 PM, Friday, Dec. 4, 2002) which may comprising, for example, the current seconds, minutes, hours, day of the week, day of the month, month, and year. Wall time derives its name from the time provided by a conventional clock that hangs on a wall and is commonly used to differentiate from CPU time which represents the number of seconds a processor spent executing a process. Due to multi-tasking and multi-processor systems, the CPU time to executed a process may vary drastically from the wall time to execute the process.
The computing device may use the system clock and/or the RTC clock to enforce policies for time-sensitive data. In particular, the computing device may provide time-based access restrictions upon data. For example, the computing device may prevent reading an email message after a period of time (e.g. a month) has elapsed from transmission. The computing device may also prevent reading of source code maintained in escrow until a particular date has arrived. As yet another example, the computing device may prevent assigning a date and/or time to a financial transaction that is earlier than the current date and/or time. However, for these time-based access restrictions to be effective, the computing device must trust the system clock is resistant to attacks that may alter the system time to the advantage of an attacker.